package com.moyq5.mvc.maker.test.feign.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.moyq5.mvc.framework.general.Body;
import com.moyq5.mvc.framework.general.Paging;
import com.moyq5.mvc.framework.general.Sorting;
import com.moyq5.mvc.framework.jackson.result.ListResult;
import com.moyq5.mvc.framework.jackson.result.ObjectResult;
import com.moyq5.mvc.framework.jackson.result.PageResult;
import com.moyq5.mvc.framework.jackson.result.StatusResult;
import com.moyq5.mvc.maker.test.bean.entity.Shop;
import com.moyq5.mvc.maker.test.bean.search.Shop4Search;


/**
 * @author Moyq5’s Tools
 * @since 2019-06-17 18:48:22
 */
@FeignClient(name="feign-server", url="${feign.server.url}")
@RequestMapping("/feign/shop")
public interface ShopFeign {

	@PostMapping("/oneById?filter=")
	@ResponseBody
	ObjectResult<Shop> one( );
	
	@PostMapping("/count")
	@ResponseBody
	ObjectResult<Long> count(Body<Shop4Search, String> shop4s);
	
	@PostMapping("/one?filter=")
	@ResponseBody
	ObjectResult<Shop> one(Body<Shop4Search, Sorting> shop4s);
	
	@PostMapping("/list?filter=")
	@ResponseBody
	ListResult<Shop> list(Body<Shop4Search, Sorting> shop4s);

	@PostMapping("/page?filter=")
	@ResponseBody
	PageResult<Shop> page(Body<Shop4Search, Paging> shop4s);

	@PutMapping
	@ResponseBody
	ObjectResult<Long> create(Shop shop);
	
	@PatchMapping
	@ResponseBody
	StatusResult update(Shop shop);
	
	@DeleteMapping
	@ResponseBody
	StatusResult remove( );

}
